The present invention relates to a semiconductor device provided with a temperature sensor, and to a data generation method for the semiconductor device, and especially relates to technology which is effective when applied to a semiconductor device requiring a highly accurate detection of temperature.
In recent years, there has been a growing demand for a higher temperature operation of a microcomputer for vehicle engine control. In conjunction with the demand, there is also a high demand of mounting a temperature sensor to the microcomputer. Since the engine of a vehicle operates at an extremely high temperature, the temperature sensor to be mounted needs to perform temperature detection with high accuracy on a high temperature side in particular.
In one of methods of the temperature detection by an on-chip temperature sensor mounted on a microcomputer in the past, for example, a voltage with a positive or negative temperature characteristic and a temperature-independent reference voltage generated by a certain method are employed and compared with each other by an analog or digital method in a temperature sensor, thereby the temperature detection is performed. The voltage with a positive or negative temperature characteristic described above uses the following voltage, for example.
As the voltage with a negative temperature characteristic, that is, the voltage decreases as the temperature increases, one uses a voltage appearing across both ends of a diode when a current is made to flow through the diode, by employing as the diode a parasitic diode, a parasitic bipolar transistor, etc. existing between wells formed over a silicon substrate by the CMOS process. As the voltage with a positive temperature characteristic, that is, the voltage increases proportionally as the temperature increases, one uses a difference voltage which is the difference of voltages appearing across both ends of the diode when the current with different values is made to flow through the diode, as is the case with the above. As another example of the voltage with a positive temperature characteristic, one may use a difference voltage produced by the difference of a base-emitter voltage of two parasitic bipolar transistors having mutually different emitter areas, when a current with the same value is made to flow through each of the two bipolar transistors.
Such voltages have comparatively high linearity to temperature. However, the voltages have nonlinear components of a second or higher order in practice, and this fact is a factor which degrades the accuracy of the temperature detection. It is generally known that devices (such as an MOS transistor, a resistor, a capacitor, a bipolar transistor, a diode) formed over a silicon substrate by the CMOS process exhibit variations in the absolute value and relative value of the element characteristic, due to process variations, power supply voltage fluctuations, and others. This fact is also a factor which degrades the accuracy of the temperature detection. Accordingly, in order to reduce the degradation of the accuracy of the temperature detection due to process variations etc., the technique of trimming for compensating variations for each chip is utilized in many cases. There is also a method of improving the detection accuracy, by performing calculation for compensating temperature with a hardware-based or software-based technique, in the temperature detection. Patent Literature 1 through Patent Literature 3, for example, disclose related methods concerning the calculation for compensating temperature.
A semiconductor device provided with a temperature sensor, disclosed by Patent Literature 1, further comprises an actual temperature measuring circuit. Defining the temperature measured by the actual temperature measuring circuit concerned as a true temperature, the measurement temperature by the temperature sensor is compensated and outputted, based on the correspondence relation of the temperature and the output value of the temperature sensor. A theoretical output value of the temperature sensor at a predetermined temperature is calculated from an ideal formula which indicates the correspondence relation of the output value of the temperature sensor and the temperature, derived by experience in advance, and the difference between the theoretical output value and the actual output value of the temperature sensor at the temperature is calculated. This difference is used as the correction data. Then, when performing the temperature measurement, a value obtained after the correction data is added to or subtracted from the output value of the temperature sensor is outputted as the measured value.
A semiconductor device provided with a temperature sensor, disclosed by Patent Literature 2, compensates the measurement temperature of the temperature sensor, through the use of a correction function which indicates the relation between a temperature and a voltage appearing across both ends of a diode employed as the temperature sensor. The temperature is measured in advance with a temperature measurement device installed separately from the semiconductor device, and the measured temperature is defined as a true temperature. The voltage appearing across both ends of the diode at the time is also measured. The voltage value is measured at two temperature points, and a linear function of the voltage value and the temperature is derived from those measured data, and used as the correction function. When performing temperature measurement, a voltage value of the temperature sensor is converted into a temperature using the correction function, and the temperature is outputted as a measured value.
A semiconductor device provided with a temperature sensor, disclosed by Patent Literature 3, creates correction data corresponding to an output value of the temperature sensor in advance outside the chip. In the actual operation, the semiconductor device outputs the correction data concerned addressed by the output value, as the measurement temperature. That is, a temperature is measured with a temperature measurement device installed separately from the semiconductor device concerned, and is defined as the true temperature. Data of a power supply voltage and an output value of the temperature sensor at that time are also obtained in advance. The correction data is created on the basis of the obtained data. When performing temperature measurement, the correction data addressed by the output value of the temperature sensor is outputted as the measurement temperature. The accuracy of the temperature compensation is decided by the number of acquired data, corresponding to the set number of the temperature and the power supply voltage which are set up in creating the correction data.    (Patent Literature 1) Japanese Patent Laid-open No. 2004-134472    (Patent Literature 2) Japanese Patent Laid-open No. 2001-298160    (Patent Literature 3) Japanese Patent Laid-open No. Hei 4 (1992)-225250